"""Helpers for the master code."""

import logging
import os
import random
import string
import yaml
from gaweb import common


def read_config(fname='master.yaml', **kwargs):
    """Read the master config files."""
    return common.read_config(fname, **kwargs)
    

def random_str(n):
    """Return a random string of length n, for n >= 0.
    If n < 0 raises ValueError."""
    if n < 0:
        raise ValueError
    return ''.join(random.choice(string.letters) for i in xrange(n))
